﻿#ifndef SEQ_DEFINE_H
#define SEQ_DEFINE_H

#include "DBDEFINE.h"
#include "CWFDefine.h"
#include <QList>
#pragma pack(1)

#define  MAX_SQL_LENGTH 1024
//为取名称统一函数加的类型
#define  SEARCH_UNIT_TYPE_NAME  1
#define  SEARCH_SEQ_TYPE_NAME   2
#define  SEARCH_UNIT_JX_TYPE_NAME    3

//遥测规则判断
#define WF_YX_RULE_EQUAL                                3
#define	WF_YC_RULE_LESS_0								0
#define	WF_YC_RULE_BIGGER_1								1

//规则项类型
#define   RULE_TYPE_YX         0
#define   RULE_TYPE_YC         1

#define  YiCi_OPER_OFF  0
#define  YiCi_OPER_ON  1

#define   WF_TICKET_BASE            0
#define   WF_ITCKET_REPAIR          1



#define  MODEL_TYPE_DX 1
#define  MODEL_TYPE_SEQ 2

//间隔状态类型最大个数
#define	 MAX_DEVSTATE_NUM  20
#define	 MAX_DEVSTATE_JUDGE_NUM  20

#define  MAX_SEQ_CONFIG_ITEM  10
#define  MAX_SEQ_RULE_ITEM    30

#define  USER_NAME_LENGTH      16
#define  USER_PASSWORD_LENGTH  8

enum ZN_TICKET_DIR_TYPE
{
	ZN_TICKET_TYPE_CZP   =1,
	ZN_TICKET_TYPE_SEQ   ,
	ZN_TICKET_TYPE_OTHER ,
	ZN_TICKET_TYPE_XML   ,
	ZN_TICKET_TYPE_NOT_CHECK_CZP , 
	ZN_TICKET_TYPE_NOT_CHECK_SEQ  
};

#define  SEQ_FILE_READ_CONTROL 0xED
//顺控操作项类型
enum SEQ_DZ_TYPE
{
	SEQ_DZ_TYPE_YK            =1,	    //遥控
	SEQ_DZ_TYPE_YK_OTHER        ,		//其它装置遥控
	SEQ_DZ_TYPE_SOFT_YB_ONOFF   ,		//软压板投退
	SEQ_DZ_TYPE_PROMPT          ,		//提示项
	SEQ_DZ_TYPE_SET_SETAREA     ,		//设置定值区
	SEQ_DZ_TYPE_CHECK_SETAREA   ,		//检查定值区
	SEQ_DZ_TYPE_CHEKC_SET               //检查定值
};

//顺控动作属性
enum SEQ_DZ_ATTRIBUTE
{
	SEQ_DZ_ATTRIBUTE_ON            =1,	    //合闸(投入)
	SEQ_DZ_ATTRIBUTE_OFF            ,		//分闸(退出)
};

//顺控出错类型
enum SEQ_ERROR_TYPE
{
	SEQ_ERROR_TYPE_STOP            =1,	    //立即停止
	SEQ_ERROR_TYPE_CONTINUE        ,		//继续执行
	SEQ_ERROR_TYPE_WAIT                     //等待确认
};

//顺控出错遥信处理类型
enum SEQ_ERRORYX_DEAL_TYPE
{
	SEQ_ERRORYX_DEAL_TYPE_STOP            =1,	    //立即停止
	SEQ_ERRORYX_DEAL_TYPE_USECONFIG        		    //提示用户
};


//顺控票类型
enum SEQ_NEW_TICKET_TYPE
{
	SEQ_TICKET_1            =1,	    //一次操作票
	SEQ_TICKET_2        		    //二次操作票
};
enum WF_operation_type
{
	WF_ON        =1,	        // 
	WF_OFF         		
};


//设备态定义判据数学符号
enum MATH_SYMBOL
{
	WF_CP_EQUAL    =1,	        //=
	WF_CP_EQUAL_BIG    ,		//>=
	WF_CP_EQUAL_LOW    ,		//<=
	WF_CP_BIG          ,		//>
	WF_CP_LOW          ,		//<
};


enum MODEL_UNIT_JX_TYPE
{
	UNIT_JX_TYPE_DOUBLE_MX    =1,	//双母接线
	UNIT_JX_TYPE_SINGLE_MX    ,		//单母接线
	UNIT_JX_TYPE_23_MX    ,		    //3/2接线
	UNIT_JX_TYPE_OTHER     ,		//其它
};

//间隔设备态类型(南网)
enum DATA_UNIT_STATE_TYPE
{
	UNIT_DEV_STATE_RUN   	       =1,
	UNIT_DEV_STATE_HOT   	        ,
	UNIT_DEV_STATE_COOL   	        ,
	UNIT_DEV_STATE_JX   	        ,
	UNIT_DEV_STATE_ZM_RUN,
	UNIT_DEV_STATE_FM_RUN,
	UNIT_DEV_STATE_ZM_HOT,
	UNIT_DEV_STATE_FM_HOT,
	UNIT_DEV_STATE_ZM_COOL,
	UNIT_DEV_STATE_FM_COOL,
	UNIT_DEV_STATE_ZM_JX,
	UNIT_DEV_STATE_FM_JX             //12
};

enum SEQ_TYPE
{
	//常规单母线，单母接线间隔
	RUN_TO_HOT        =1,	    //运行转热备用
	RUN_TO_COOL         ,		//
	RUN_TO_JX           ,		//
	HOT_TO_RUN          ,		//
	HOT_TO_COOL         ,		//
	HOT_TO_JX           ,		//
	COOL_TO_RUN         ,		//
	COOL_TO_HOT         ,		//
	COOL_TO_JX          ,		//
	JX_TO_RUN           ,		//
	JX_TO_HOT           ,		
	JX_TO_COOL     	  =12, 

	//双母线接线线路，主变等
	ZM_RUN_TO_ZM_HOT    ,//05_07
	ZM_RUN_TO_FM_RUN    ,
	ZM_RUN_TO_FM_HOT    ,
	ZM_RUN_TO_COOL      ,
	ZM_RUN_TO_JX        ,

	ZM_HOT_TO_ZM_RUN ,
	ZM_HOT_TO_FM_RUN ,   
	ZM_HOT_TO_FM_HOT,
	ZM_HOT_TO_COOL,
	ZM_HOT_TO_JX,

	FM_RUN_TO_ZM_RUN ,
	FM_RUN_TO_ZM_HOT   , 
	FM_RUN_TO_FM_HOT,
	FM_RUN_TO_COOL,
	FM_RUN_TO_JX,

	FM_HOT_TO_ZM_RUN ,
	FM_HOT_TO_ZM_HOT    ,
	FM_HOT_TO_FM_RUN,
	FM_HOT_TO_COOL,
	FM_HOT_TO_JX,

	COOL_TO_ZM_RUN,
	COOL_TO_ZM_HOT,
	COOL_TO_FM_RUN,
	COOL_TO_FM_HOT,
	BAK_COOL_TO_JX,//为了保持顺控转换类型编号连续而保留，实际模版读模版文件和写操作票时把态转化为常规值

	JX_TO_ZM_RUN,
	JX_TO_ZM_HOT,
	JX_TO_FM_RUN,
	JX_TO_FM_HOT,
	BAK_JX_TO_COOL,//为了保持顺控转换类型编号连续而保留，实际模版读模版文件和写操作票时把态转化为常规值

	//双母线
	MX_ZMRUN_TO_ZMHOT          ,	    //正母运行转正母热备用
	MX_ZMRUN_TO_ZMCOOL         ,		//
	MX_ZMRUN_TO_ZMJX           ,		//
	MX_ZMHOT_TO_ZMRUN          ,		//
	MX_ZMHOT_TO_ZMCOOL         ,		//
	MX_ZMHOT_TO_ZMJX           ,		//
	MX_ZMCOOL_TO_ZMRUN         ,		//
	MX_ZMCOOL_TO_ZMHOT         ,		//
	MX_ZMCOOL_TO_ZMJX          ,		//
	MX_ZMJX_TO_ZMRUN           ,		//
	MX_ZMJX_TO_ZMHOT           ,		//
	MX_ZMJX_TO_ZMCOOL     	   ,        //

	MX_FMRUN_TO_FMHOT          ,	    //副母运行转副母热备用
	MX_FMRUN_TO_FMCOOL         ,		//
	MX_FMRUN_TO_FMJX           ,		//
	MX_FMHOT_TO_FMRUN          ,		//
	MX_FMHOT_TO_FMCOOL         ,		//
	MX_FMHOT_TO_FMJX           ,		//
	MX_FMCOOL_TO_FMRUN         ,		//
	MX_FMCOOL_TO_FMHOT         ,		//
	MX_FMCOOL_TO_FMJX          ,		//
	MX_FMJX_TO_FMRUN           ,		//
	MX_FMJX_TO_FMHOT           ,		//
	MX_FMJX_TO_FMCOOL     	   ,        //


	MAX_SEQ_TYPE_DEFINE   
};
typedef struct  s_d_
{
	char*   sname;// 显示名称
	int     data; // 关联ITEMDATA 或 Qtablewidget 宽度
} s_d;

static s_d strWF_oper_type[2] = 
{
	"合上/关闭(门)",WF_ON,
	"拉开/打开(门)",WF_OFF            
};
static s_d strWF_Unit_state_and_dsp[18] = 
{
	"运行态",UNIT_DEV_STATE_RUN,
	"热备态",UNIT_DEV_STATE_HOT,  
	"冷备态",UNIT_DEV_STATE_COOL,
	"检修态",UNIT_DEV_STATE_JX,
	"正母运行态",UNIT_DEV_STATE_ZM_RUN,
	"副母运行态",UNIT_DEV_STATE_FM_RUN,  
	"正母热备态",UNIT_DEV_STATE_ZM_HOT,
	"副母热备态",UNIT_DEV_STATE_FM_HOT,
	"冷备态", UNIT_DEV_STATE_COOL,
	"检修态",UNIT_DEV_STATE_JX,
	"正母运行态",UNIT_DEV_STATE_ZM_RUN,
	"副母运行态",UNIT_DEV_STATE_FM_RUN,  
	"正母热备态",UNIT_DEV_STATE_ZM_HOT,
	"副母热备态",UNIT_DEV_STATE_FM_HOT,
	"正母冷备态",UNIT_DEV_STATE_ZM_COOL,
	"副母冷备态",UNIT_DEV_STATE_FM_COOL,  
	"正母检修态",UNIT_DEV_STATE_ZM_JX,
	"副母检修态",UNIT_DEV_STATE_FM_JX

};
static s_d strWF_Unit_state[4] = 
{
	"运行态",UNIT_DEV_STATE_RUN,
	"热备态",UNIT_DEV_STATE_HOT,  
	"冷备态",UNIT_DEV_STATE_COOL,
	"检修态",UNIT_DEV_STATE_JX
};
static s_d strWF_Unit_DoubleMx_Line_state[6] = 
{
	"正母运行态",UNIT_DEV_STATE_ZM_RUN,
	"副母运行态",UNIT_DEV_STATE_FM_RUN,  
	"正母热备态",UNIT_DEV_STATE_ZM_HOT,
	"副母热备态",UNIT_DEV_STATE_FM_HOT,
	"冷备态", UNIT_DEV_STATE_COOL,
	"检修态",UNIT_DEV_STATE_JX
};

static s_d strWF_Unit_DoubleMx_state[8] = 
{
	"正母运行态",UNIT_DEV_STATE_ZM_RUN,
	"副母运行态",UNIT_DEV_STATE_FM_RUN,  
	"正母热备态",UNIT_DEV_STATE_ZM_HOT,
	"副母热备态",UNIT_DEV_STATE_FM_HOT,
	"正母冷备态",UNIT_DEV_STATE_ZM_COOL,
	"副母冷备态",UNIT_DEV_STATE_FM_COOL,  
	"正母检修态",UNIT_DEV_STATE_ZM_JX,
	"副母检修态",UNIT_DEV_STATE_FM_JX
};

static  s_d strticket_head[3] = 
{
	"序号",40,
	"操作内容",300,
	"操作序列简述",100
};
static s_d strticket_seq_head[12] = 
{
	"序号",40,
	"动作类型",100,
	"动作对象",200,
	"动作属性",100,
	"操作内容",300,
	"操作序列简述",100,
	"执行条件",100,
	"确认条件",100,
	"出错类型",100,
	"延时时间",100,
	"超时时间",100,
	"定值区号",100,
};

static s_d str_seq_dz_type[7] = 
{ 
	"遥控",SEQ_DZ_TYPE_YK,
	"其它装置遥控",SEQ_DZ_TYPE_YK_OTHER,  
	"软压板投退",SEQ_DZ_TYPE_SOFT_YB_ONOFF,
	"提示项",SEQ_DZ_TYPE_PROMPT,
	"设置定值区",SEQ_DZ_TYPE_SET_SETAREA,
	"检查定值区",SEQ_DZ_TYPE_CHECK_SETAREA,
	"检查定值",SEQ_DZ_TYPE_CHEKC_SET
};

static s_d str_seq_dz_attribute[2] = 
{
	"合闸(投入)",SEQ_DZ_ATTRIBUTE_ON,
	"分闸(退出)",SEQ_DZ_ATTRIBUTE_OFF
};

static s_d str_seq_error_type[3] = 
{
	"立即停止",SEQ_ERROR_TYPE_STOP,
	"继续执行",SEQ_ERROR_TYPE_CONTINUE,
	"等待确认",SEQ_ERROR_TYPE_WAIT
};

static s_d str_seq_erroryx_head[2] = 
{
	"遥信名称",200,
	"出错处理",200
};

static s_d str_seq_erroryx_del_type[2] = 
{
	"立即停止",SEQ_ERRORYX_DEAL_TYPE_STOP,
	"提示用户是否停止或继续",SEQ_ERRORYX_DEAL_TYPE_USECONFIG
};
static s_d strUnit_jx_type[4] = 
{
	"双母接线",UNIT_JX_TYPE_DOUBLE_MX,
	"单母接线",UNIT_JX_TYPE_SINGLE_MX,
	"3/2接线",UNIT_JX_TYPE_23_MX,
	"其它",UNIT_JX_TYPE_OTHER
};

#define COMM_UNIT_MAX_NUM 19

static s_d strUnit_type[COMM_UNIT_MAX_NUM] = 
{
	"500kV线路",COMM_UNIT_500_LINE,
	"220kV线路",COMM_UNIT_220_LINE,
	"110kV线路",COMM_UNIT_110_LINE,
	"66kV线路",COMM_UNIT_66_LINE,
	"35kV线路",COMM_UNIT_35_LINE,

	"10kV线路",COMM_UNIT_10_LINE,
	"主变高压侧",COMM_UNIT_ZB_H,
	"主变中压侧",COMM_UNIT_ZB_Z,
	"主变低压侧",COMM_UNIT_ZB_D,
	"线路PT",COMM_UNIT_PT,

	"电容器",COMM_UNIT_DRQ,
	"接地变",COMM_UNIT_JDB,
	"站用变",COMM_UNIT_ZYB,
	"母联分段",COMM_UNIT_MLFD,
	"主变本体",COMM_UNIT_ZB_BT,

	"旁路",COMM_UNIT_PANGLU,
	"单母线",COMM_UNIT_SINGLEMX,
	"双母线",COMM_UNIT_DOUBLEMX,
	"3/2接线双母线",COMM_UNIT_23_DOUBLEMX
};

//常规
static s_d strSeq_type[12] = 
{
	"运行转热备用",RUN_TO_HOT,
	"运行转冷备用",RUN_TO_COOL,
	"运行转检修",RUN_TO_JX,
	"热备用转运行",HOT_TO_RUN,
	"热备用转冷备用",HOT_TO_COOL,
	"热备用转检修",HOT_TO_JX,
	"冷备用转运行",COOL_TO_RUN,
	"冷备用转热备用",COOL_TO_HOT,
	"冷备用转检修",COOL_TO_JX,
	"检修转运行",JX_TO_RUN,
	"检修转热备用",JX_TO_HOT,
	"检修转冷备用",JX_TO_COOL
};
//双母线线路，包括主变三侧双母线接线方式11
static s_d strSeq_DoubleMX_Line_type[30] = 
{
	"正母运行转正母热备",ZM_RUN_TO_ZM_HOT,
	"正母运行转副母运行",ZM_RUN_TO_FM_RUN,
	"正母运行转副母热备",ZM_RUN_TO_FM_HOT,
	"正母运行转冷备",ZM_RUN_TO_COOL,
	"正母运行转检修",ZM_RUN_TO_JX,

	"正母热备转正母运行",ZM_HOT_TO_ZM_RUN,
	"正母热备转副母运行",ZM_HOT_TO_FM_RUN,
	"正母热备转副母热备",ZM_HOT_TO_FM_HOT,
	"正母热备转冷备",ZM_HOT_TO_COOL,
	"正母热备转检修",ZM_HOT_TO_JX,

	"副母运行转正母运行",FM_RUN_TO_ZM_RUN,
	"副母运行转正母热备",FM_RUN_TO_ZM_HOT,
	"副母运行转副母热备",FM_RUN_TO_FM_HOT,
	"副母运行转冷备",FM_RUN_TO_COOL,
	"副母运行转检修",FM_RUN_TO_JX,

	"副母热备转正母运行",FM_HOT_TO_ZM_RUN,
	"副母热备转正母热备",FM_HOT_TO_ZM_HOT,
	"副母热备转副母运行",FM_HOT_TO_FM_RUN,
	"副母热备转冷备",FM_HOT_TO_COOL,
	"副母热备转检修",FM_HOT_TO_JX,


	"冷备转正母运行",COOL_TO_ZM_RUN,
	"冷备转正母热备",COOL_TO_ZM_HOT,
	"冷备转副母运行",COOL_TO_FM_RUN,
	"冷备转副母热备",COOL_TO_FM_HOT,
	"冷备转检修",BAK_COOL_TO_JX,

	"检修转正母运行",JX_TO_ZM_RUN,
	"检修转正母热备",JX_TO_ZM_HOT,
	"检修转副母运行",JX_TO_FM_RUN,
	"检修转副母热备",JX_TO_FM_HOT,
	"检修转冷备",BAK_JX_TO_COOL
};

//双母线
static s_d strSeq_DoubleMX_type[24] = 
{
	"正母运行转正母热备用",MX_ZMRUN_TO_ZMHOT,
	"正母运行转正母冷备用",MX_ZMRUN_TO_ZMCOOL,
	"正母运行转正母检修",MX_ZMRUN_TO_ZMJX,
	"正母热备用转正母运行",MX_ZMHOT_TO_ZMRUN,
	"正母热备用转正母冷备用",MX_ZMHOT_TO_ZMCOOL,
	"正母热备用转正母检修",MX_ZMHOT_TO_ZMJX,
	"正母冷备用转正母运行",MX_ZMCOOL_TO_ZMRUN,
	"正母冷备用转正母热备用",MX_ZMCOOL_TO_ZMHOT,
	"正母冷备用转正母检修",MX_ZMCOOL_TO_ZMJX,
	"正母检修转正母运行",MX_ZMJX_TO_ZMRUN,
	"正母检修转正母热备用",MX_ZMJX_TO_ZMHOT,
	"正母检修转正母冷备用",MX_ZMJX_TO_ZMCOOL,//12

	"副母运行转副母热备用",MX_FMRUN_TO_FMHOT,
	"副母运行转副母冷备用",MX_FMRUN_TO_FMCOOL,
	"副母运行转副母检修",MX_FMRUN_TO_FMJX,
	"副母热备用转副母运行",MX_FMHOT_TO_FMRUN,
	"副母热备用转副母冷备用",MX_FMHOT_TO_FMCOOL,
	"副母热备用转副母检修",MX_FMHOT_TO_FMJX,
	"副母冷备用转副母运行",MX_FMCOOL_TO_FMRUN,
	"副母冷备用转副母热备用",MX_FMCOOL_TO_FMHOT,
	"副母冷备用转副母检修",MX_FMCOOL_TO_FMJX,
	"副母检修转副母运行",MX_FMJX_TO_FMRUN,
	"副母检修转副母热备用",MX_FMJX_TO_FMHOT,
	"副母检修转副母冷备用",MX_FMJX_TO_FMCOOL//24
};

//static s_d str_table_nari_user[3] = 
//{
//	"操作员",0,
//	"高级用户",1,
//	"管理员",2
//};

static s_d str_table_head[2] = 
{
	"五防元件类型",200,
	"操作方法",200
};


static s_d strWF_O_type[50] = 
{
	"开关",WF_KG,
	"开关手车",WF_KG_SHOUCHE ,           

	"正母母线侧隔离刀闸",WF_GLDZ_ZM_MXC         ,
	"副母母线侧隔离刀闸",WF_GLDZ_FM_MXC         ,
	"线路侧隔离刀闸",WF_GLDZ_XLC         ,

	"母线侧接地刀闸",WF_JDDZ_KGMXC         ,
	"开关侧接地刀闸",WF_JDDZ_KGXLC         ,	
	"线路侧接地刀闸",WF_JDDZ_XLC         ,

	"母线侧接地线",WF_DX_KGMXC             ,
	"开关侧接地线",WF_DX_KGXLC             ,//10
	"线路侧接地线",WF_DX_XLC             ,

	"PT隔离刀闸",WF_PT_PT                ,
	"PT母线接地线",WF_PT_PT0             ,
	"PT接地刀闸",WF_PT_J00               ,
	"PT接地线",WF_PT_J00_D               ,

	"分段开关",WF_FD_KG                  ,
	"分段开关手车",WF_FD_SHOUCHE         ,
	"分段隔离刀闸(手车)", WF_FD_GLDZ_SHOUCHE      ,
	"分段接地线",WF_FD_DX                ,
	"前网(柜)门",WF_WM_QIAN              ,//20
	"后网(柜)门",WF_WM_HOU               ,
	"主变中性点接地刀闸",WF_ZB_ZXD       ,
	"旁路隔离刀闸",WF_ZB_PL_GLDZ         , 
	"母线接地刀闸1",WF_MX_JDDZ1         ,
	"母线接地刀闸2",WF_MX_JDDZ2         ,
	"母线接地线1",WF_MX_DX1         ,
	"母线接地线2",WF_MX_DX2         ,

	"电容器隔离刀闸",WF_DRQ_GLDZ         ,       //电容器隔离刀闸
	"电容器接地刀闸",WF_DRQ_JDDZ        ,        //电容器接地刀闸
	"接地变变压器接地刀闸",WF_JDB_JDDZ         ,       //接地变变压器接地刀闸
	"备用1",WF_DEV_BAK1         ,       //备用1
	"备用2",WF_DEV_BAK2         ,       //备用2
	"备用3",WF_DEV_BAK3         ,       //备用3
	"备用4",WF_DEV_BAK4         ,       //备用4
	"备用5",WF_DEV_BAK5         ,       //备用5


	"500kV边开关1",WF_500KV_BKG_1         ,
	"500kV边开关1靠母线侧隔离刀闸",WF_500KV_BKG_1_MXC_GLDZ         ,//
	"500kV边开关1靠线路侧隔离刀闸",WF_500KV_BKG_1_XLC_GLDZ         ,
	"500kV边开关1靠母线侧接地刀闸",WF_500KV_BKG_1_MXC_JDDZ         ,
	"500kV边开关1靠线路侧接地刀闸",WF_500KV_BKG_1_XLC_JDDZ         ,

	"500kV边开关2",WF_500KV_BKG_2         ,
	"500kV边开关2靠母线侧隔离刀闸",WF_500KV_BKG_2_MXC_GLDZ         ,
	"500kV边开关2靠线路侧隔离刀闸",WF_500KV_BKG_2_XLC_GLDZ         ,
	"500kV边开关2靠母线侧接地刀闸",WF_500KV_BKG_2_MXC_JDDZ         ,
	"500kV边开关2靠线路侧接地刀闸",WF_500KV_BKG_2_XLC_JDDZ         ,

	"500kV边开关3",WF_500KV_BKG_3         ,
	"500kV边开关3靠母线侧隔离刀闸",WF_500KV_BKG_3_MXC_GLDZ         ,
	"500kV边开关3靠线路侧隔离刀闸",WF_500KV_BKG_3_XLC_GLDZ         ,
	"500kV边开关3靠母线侧接地刀闸",WF_500KV_BKG_3_MXC_JDDZ         ,
	"500kV边开关3靠线路侧接地刀闸",WF_500KV_BKG_3_XLC_JDDZ         ,//50
};

static  s_d strWF_Math_FH[5] = 
{
	"=",WF_CP_EQUAL,
	">=",WF_CP_EQUAL_BIG,  
	"<=",WF_CP_EQUAL_LOW,
	">",WF_CP_BIG,
	"<",WF_CP_LOW
};

static  s_d strSeq_Alltype_Name[67] = 
{
	//常规段
	"填充类型",0,//为了编号保持一致
	"运行转热备用",RUN_TO_HOT,
	"运行转冷备用",RUN_TO_COOL,
	"运行转检修",RUN_TO_JX,
	"热备用转运行",HOT_TO_RUN,
	"热备用转冷备用",HOT_TO_COOL,
	"热备用转检修",HOT_TO_JX,
	"冷备用转运行",COOL_TO_RUN,
	"冷备用转热备用",COOL_TO_HOT,
	"冷备用转检修",COOL_TO_JX,
	"检修转运行",JX_TO_RUN,
	"检修转热备用",JX_TO_HOT,
	"检修转冷备用",JX_TO_COOL,//12+1

	//双母线线路段
	"正母运行转正母热备",ZM_RUN_TO_ZM_HOT,
	"正母运行转副母运行",ZM_RUN_TO_FM_RUN,
	"正母运行转副母热备",ZM_RUN_TO_FM_HOT,
	"正母运行转冷备",ZM_RUN_TO_COOL,
	"正母运行转检修",ZM_RUN_TO_JX,

	"正母热备转正母运行",ZM_HOT_TO_ZM_RUN,
	"正母热备转副母运行",ZM_HOT_TO_FM_RUN,
	"正母热备转副母热备",ZM_HOT_TO_FM_HOT,
	"正母热备转冷备",ZM_HOT_TO_COOL,
	"正母热备转检修",ZM_HOT_TO_JX,//22+1

	"副母运行转正母运行",FM_RUN_TO_ZM_RUN,
	"副母运行转正母热备",FM_RUN_TO_ZM_HOT,
	"副母运行转副母热备",FM_RUN_TO_FM_HOT,
	"副母运行转冷备",FM_RUN_TO_COOL,
	"副母运行转检修",FM_RUN_TO_JX,

	"副母热备转正母运行",FM_HOT_TO_ZM_RUN,
	"副母热备转正母热备",FM_HOT_TO_ZM_HOT,
	"副母热备转副母运行",FM_HOT_TO_FM_RUN,
	"副母热备转冷备",FM_HOT_TO_COOL,
	"副母热备转检修",FM_HOT_TO_JX,//32+1


	"冷备转正母运行",COOL_TO_ZM_RUN,
	"冷备转正母热备",COOL_TO_ZM_HOT,
	"冷备转副母运行",COOL_TO_FM_RUN,
	"冷备转副母热备",COOL_TO_FM_HOT,
	"冷备转检修",BAK_COOL_TO_JX,

	"检修转正母运行",JX_TO_ZM_RUN,
	"检修转正母热备",JX_TO_ZM_HOT,
	"检修转副母运行",JX_TO_FM_RUN,
	"检修转副母热备",JX_TO_FM_HOT,
	"检修转冷备",BAK_JX_TO_COOL,//42+1


	//双母线
	"正母运行转正母热备用",MX_ZMRUN_TO_ZMHOT,
	"正母运行转正母冷备用",MX_ZMRUN_TO_ZMCOOL,
	"正母运行转正母检修",MX_ZMRUN_TO_ZMJX,
	"正母热备用转正母运行",MX_ZMHOT_TO_ZMRUN,
	"正母热备用转正母冷备用",MX_ZMHOT_TO_ZMCOOL,
	"正母热备用转正母检修",MX_ZMHOT_TO_ZMJX,
	"正母冷备用转正母运行",MX_ZMCOOL_TO_ZMRUN,
	"正母冷备用转正母热备用",MX_ZMCOOL_TO_ZMHOT,
	"正母冷备用转正母检修",MX_ZMCOOL_TO_ZMJX,
	"正母检修转正母运行",MX_ZMJX_TO_ZMRUN,
	"正母检修转正母热备用",MX_ZMJX_TO_ZMHOT,
	"正母检修转正母冷备用",MX_ZMJX_TO_ZMCOOL,//54+1

	"副母运行转副母热备用",MX_FMRUN_TO_FMHOT,
	"副母运行转副母冷备用",MX_FMRUN_TO_FMCOOL,
	"副母运行转副母检修",MX_FMRUN_TO_FMJX,
	"副母热备用转副母运行",MX_FMHOT_TO_FMRUN,
	"副母热备用转副母冷备用",MX_FMHOT_TO_FMCOOL,
	"副母热备用转副母检修",MX_FMHOT_TO_FMJX,
	"副母冷备用转副母运行",MX_FMCOOL_TO_FMRUN,
	"副母冷备用转副母热备用",MX_FMCOOL_TO_FMHOT,
	"副母冷备用转副母检修",MX_FMCOOL_TO_FMJX,
	"副母检修转副母运行",MX_FMJX_TO_FMRUN,
	"副母检修转副母热备用",MX_FMJX_TO_FMHOT,
	"副母检修转副母冷备用",MX_FMJX_TO_FMCOOL//66+1
};

static s_d strunit_jxtype_tablehead[2] = 
{
	"间隔类型",180,
	"接线类型",80          
};

static s_d strunit_state_tablehead[3] = 
{
	"测点",180,
	"运算符",80,
	"值",80            
};

//extern static s_d strSeq_Alltype_Name[67];

//61850顺控数据库点关联
typedef struct _SEQ_DATA_LINK									//数据库点关联
{
	XCHAR 	    szByName[BYNAME_LEN*sizeof(XCHAR )]; 
	XINT        DevAdd;                                         //本操作步骤所属设备地址
	XUINT 	    TableID;  
	XUSHORT     ParentIndex;                                    //遥信表点号
	XCHAR       LDName[MMSDESCRIBE_MAX_LEN];					//61850逻辑设备的名字
	XCHAR       MmsName[MMSDESCRIBE_MAX_LEN];					//本装置测点用mms名称表示
	_SEQ_DATA_LINK()
	{
		memset(szByName,0x0,BYNAME_LEN);
		DevAdd=0;
		TableID=0;
		ParentIndex=0;
		memset(LDName,0,MMSDESCRIBE_MAX_LEN);
		memset(MmsName,0,MMSDESCRIBE_MAX_LEN);
	}
	~_SEQ_DATA_LINK()
	{
	}
}SEQ_DATA_LINK;		

typedef struct _SEQ_EXE_CONFIG							  
{
	SEQ_DATA_LINK seq_data_link;
	XFLOAT        f_yc_value;                             //测值
	XBYTE         yc_compare;                             //比较方法（数学符号）
	_SEQ_EXE_CONFIG()
	{
		f_yc_value=0;
		yc_compare=1;
	}
	~_SEQ_EXE_CONFIG()
	{
	}
}SEQ_EXE_CONFIG;	



//*********************以下：设备态定义及顺控操作票文件说明**********************************************************************



//暂定设备最大态个数20个
typedef struct _SEQ_ONE_DEVSTATE_JUDGE_STRUCT		//描述一个态的计算变量结构
{
	XBYTE  state_value;//状态值(遥测值)
	int dot_num;       //参与运算的实际有效测点个数
	SEQ_EXE_CONFIG seq_judge[MAX_DEVSTATE_JUDGE_NUM];
	_SEQ_ONE_DEVSTATE_JUDGE_STRUCT()
	{
		state_value=0;
		dot_num=0;
	}
	~_SEQ_ONE_DEVSTATE_JUDGE_STRUCT()
	{
	}
}SEQ_ONE_DEVSTATE_JUDGE_STRUCT;	

typedef struct _SEQ_DEVSTATE_FILE					//一个设备态文件结构
{
	int statenum_of_dev;         //这个设备总共有几个设备态（最大MAX_DEVSTATE_NUM个）
	int bvalid[MAX_DEVSTATE_NUM];//对应那几个索引有效
	SEQ_ONE_DEVSTATE_JUDGE_STRUCT one_state[MAX_DEVSTATE_NUM];
	_SEQ_DEVSTATE_FILE()
	{
	}
	~_SEQ_DEVSTATE_FILE()
	{
	}
}SEQ_DEVSTATE_FILE;	


//顺控操作票文件头
typedef struct _WF_SeqHead_
{
	char 	 szByName[BYNAME_LEN*sizeof(char)]; //所属设备别名
	char     ticketdsp[STRING_CHAR_MAX_LEN];    //操作票名称
	int      seq_type;                          //顺控设备态转化类型
	int      ticket_item_count;			//票项个数（STRUCT_SEQ_ONE_STEP_INFO结构个数）
	int      erroryx_count;				//出错遥信个数（WF_SEQ_ERRORYX结构个数）

	int      unit_code;//调度间隔编号，暂时存设备地址
	int      bak2;
	int      bak3;
	char     char_bak[STRING_CHAR_MAX_LEN];
	_WF_SeqHead_()
	{
		memset(ticketdsp,0,STRING_CHAR_MAX_LEN);
		seq_type=0;
		ticket_item_count=0;
		erroryx_count=0;
		unit_code=0;
		bak2=0;
		bak3=0;
		memset(char_bak,0,STRING_CHAR_MAX_LEN);
	}
	~_WF_SeqHead_()
	{
	}
}WF_SeqHead;
//普通操作票项结构 
typedef struct _STRUCT_WF_ONE_STEP_INFO
{
	DATA_LINK		    db_link;								//数据库测点
	char				content[STRING_CHAR_MAX_LEN];	        //票术语内容
	char				before_state;							//动作前的状态(是否是五防状态),
	char				type;									//是一次操作项，二次操作项，还是提示项
	char				lock_type;								//锁类型
	XUSHORT				lock_addr;								//锁地址
	XINT                wf_dev_type;                            //五防设备类型
	char				start_state;							//开始状态
	char				end_state;								//结束状态
	char				verb[BYNAME_LEN];						//动词
	char				is_done;								//是否已经完成
	XINT				done_time;								//完成时间
	bool				bIsOperateGroundLine;					//是否是地线
	XINT				groundLineID;							//地线ID
	bool				isUse;									//TRUE 接地线  FALSE 拆地线

	bool				bIsLinkAgeOperBegin;					//是否连动操作第一步
	bool				bIsInLinkAgeOper;						//是否在连动操作中
	bool                bPreviewed;                             //是否预演过
	_STRUCT_WF_ONE_STEP_INFO()
	{
		memset(content,0x0,STRING_CHAR_MAX_LEN);
		before_state=0;
		type=0;
		lock_type=0;
		lock_addr=0;
		start_state=0;
		end_state=0;

		is_done=0;
		done_time=0;
		isUse=0;
		bIsOperateGroundLine=FALSE;
		groundLineID=0;

		bIsInLinkAgeOper=FALSE;
		bIsLinkAgeOperBegin=FALSE;
		bPreviewed = FALSE;
	}
	~_STRUCT_WF_ONE_STEP_INFO()
	{
	}
}STRUCT_WF_ONE_STEP_INFO;//操作项和提示项结构

//顺控操作票项结构
typedef struct _STRUCT_SEQ_ONE_STEP_INFO
{
	XINT		  seq_dz_type;									//顺控动作类型，遥控、检查定值、修改/检查定值区等
	SEQ_DATA_LINK step_yx_link;									//本部操作对象遥信开入信息(后台用)
	SEQ_DATA_LINK step_yk_link;								    //本部操作对象对应遥控点信息（远动用）

	char		  content[STRING_CHAR_MAX_LEN];					//票术语内容,必须转为Utf8写文件

	SEQ_DATA_LINK seqrule_link[MAX_SEQ_RULE_ITEM];				//所有参与操作规则计算的测点信息
	char          seqrule_nbl[STRING_CHAR_MAX_LEN];				//规则计算公式（逆波兰）

	XINT		  seq_dz_attribute;                              //顺控动作属性，分闸、合闸（仅对遥控操作有效）

	XINT          config_num;                                    //确认条件个数
	SEQ_EXE_CONFIG config_item[MAX_SEQ_CONFIG_ITEM];             //确认条件具体内容
	XINT		  seq_error_type;                                //出错处理
	XINT          time_delay;                                    //操作延时
	XINT          time_out;                                      //操作超时时间
	XINT          seq_set_area;                                  //定值区域

	int      ibak1;
	int      ibak2;
	int      ibak3;
	char     char_bak[STRING_CHAR_MAX_LEN];

	_STRUCT_SEQ_ONE_STEP_INFO()
	{
		seq_dz_type=SEQ_DZ_TYPE_YK;
		memset(content,0x0,STRING_CHAR_MAX_LEN);
		memset(seqrule_nbl,0,STRING_CHAR_MAX_LEN);
		seq_dz_attribute=SEQ_DZ_ATTRIBUTE_ON;
		config_num=0;
		seq_error_type=SEQ_ERROR_TYPE_STOP;
		time_delay=2;
		time_out=100;
		seq_set_area=0;

		ibak1=0;
		ibak2=0;
		ibak3=0;
		memset(char_bak,0,STRING_CHAR_MAX_LEN);
	}
	~_STRUCT_SEQ_ONE_STEP_INFO()
	{
	}
}STRUCT_SEQ_ONE_STEP_INFO;//操作项和提示项结构



//顺控出错遥信结构
typedef struct _WF_SEQ_ERRORYX
{
	SEQ_DATA_LINK seq_data_link;
	int         erroryx_deal;                                   //出错遥信处理
	_WF_SEQ_ERRORYX()
	{
		erroryx_deal = SEQ_ERRORYX_DEAL_TYPE_STOP;
	}
	~_WF_SEQ_ERRORYX()
	{		
	}
}WF_SEQ_ERRORYX;


typedef struct _UNIT_JX_TYPE_SET					   //数据库点关联
{
	int      unit_type;                                //遥测值
	int      unit_jx_type;                             //遥测比较方法
	_UNIT_JX_TYPE_SET()
	{
		unit_type=0;
		unit_jx_type=0;
	}
	~_UNIT_JX_TYPE_SET()
	{
	}
}UNIT_JX_TYPE_SET;

//票模版文件结构
typedef struct _WF_Model_
{
	XUSHORT       wf_0_type;					//五防元件类型
	XCHAR         oper_type;					//分合
	_WF_Model_()
	{
		wf_0_type=0;
		oper_type=0;
	}
	~_WF_Model_()
	{		
	}
}WF_Model;



typedef struct _WF_PARAM_YX_LINK							//五防遥信
{
	XCHAR         L_DevByName[BYNAME_LEN];					//联锁点父设备别名
	XBYTE         L_RelateType;                             //联锁点表ID
	XUSHORT       L_IndexNo;                                //联锁设备点号
	XBYTE         L_StartState;                             //联锁点起始状态
	XBYTE         L_EndState;                               //联锁点结束状态
	XBYTE         Link_Type;                                //联锁属性

	_WF_PARAM_YX_LINK()
	{
		memset(L_DevByName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
		L_RelateType=0;
		L_IndexNo=0;
		L_StartState=0;
		L_EndState=0;
		Link_Type=0;
	}
}WF_PARAM_YX_LINK;

typedef struct _WF_PARAM_YX_LINK_SIMPLE							//五防遥信
{
	XCHAR         S_DevByName[BYNAME_LEN];					//联锁点父设备别名
	XBYTE         S_RelateType;                             //联锁点表ID
	XUSHORT       S_IndexNo;                                //联锁设备点号
	XBYTE         S_StartState;                             //联锁点起始状态
	XBYTE         S_EndState;                               //联锁点结束状态
	_WF_PARAM_YX_LINK_SIMPLE()
	{
		memset(S_DevByName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
		S_RelateType=0;
		S_IndexNo=0;
		S_StartState=0;
		S_EndState=0;
	}
}WF_PARAM_YX_LINK_SIMPLE;
//逆波兰
#define   MS    100
typedef struct _SqStack 
{ 
	char *base; 
	char *top; 
	char stacksize; 
}SqStack;




typedef QList<WF_Model>  LIST_Wf_Model;
typedef LIST_Wf_Model::iterator ITR_Wf_model;

typedef QList<SEQ_EXE_CONFIG>  LIST_Wf_Unit_Dev_State;
typedef LIST_Wf_Unit_Dev_State::iterator ITR_Wf_Unit_Dev_State;

typedef QList<UNIT_JX_TYPE_SET>  LIST_Wf_Unit_Jx_Type_Set;
typedef LIST_Wf_Unit_Jx_Type_Set::iterator ITR_Wf_Unit_Jx_Type_Set;


typedef QList<STRUCT_WF_ONE_STEP_INFO>  LIST_Wf_Ticket;
typedef QList<STRUCT_SEQ_ONE_STEP_INFO>  LIST_Seq_Ticket;

typedef QList<WF_SEQ_ERRORYX>  LIST_seq_erroryx;

typedef LIST_Wf_Ticket::iterator ITR_Wf_ticket;


//为取名称统一函数加的类型
#define  SEARCH_UNIT_TYPE_NAME  1
#define  SEARCH_SEQ_TYPE_NAME   2
#define  SEARCH_UNIT_JX_TYPE_NAME    3



enum SEQ_TICKET_EDIT_COLUMN
{
	EDIT_COLUMN_XUHAO            =0,	//
	EDIT_COLUMN_DZ_TYPE           ,		//
	EDIT_COLUMN_DZ_OBJECT         ,		//
	EDIT_COLUMN_DZ_ATTRUBUTE      ,		//
	EDIT_COLUMN_CONTENT           ,		//
	EDIT_COLUMN_DSP               ,		//
	EDIT_COLUMN_EXE_RULE          ,		//
	EDIT_COLUMN_CONFIG            ,		//
	EDIT_COLUMN_ERROR_TYPE        ,		//
	EDIT_COLUMN_TIME_DELAY        ,		//
	EDIT_COLUMN_TIME_OUT          ,
	EDIT_COLUMN_SETAREA
};
//设备状态定义表、顺控操作确认、出错遥信处理方式代理区分
#define  DELETE_TYPE_DEVSTATE    1
#define  DELETE_TYPE_UNIT_TYPE    2
#define  DELETE_TYPE_SEQ_CONFIG  3
#define  DELETE_TYPE_ERRORYX_DEL 4

#define  TREE_ITEM_ROOT        1000 //偏移

#define  MODEL_TYPE_CZP 1
#define  MODEL_TYPE_SEQ 2

struct COM_INI
{
	int          m_nDataBits;       
	int          m_nBaud;           
	int          m_nStopbits;       
	int          m_nParity;         
	int          m_nInd;            
	int          m_nFlowCtrl;       
	int          m_nincount;        
	int          m_noutcount;       
	COM_INI()
	{
		m_nInd=1;
		m_nDataBits=0;
		m_nBaud=9600;
		m_nStopbits=0;
		m_nParity=0;
		m_nFlowCtrl=0;
		m_nincount=140;
		m_noutcount=140;
	}
};



typedef struct _STRUCT_SYSTEM_PARA_INFO
{
	COM_INI		com_ini;
	XCHAR		default_file[250];
	bool        wf_Is_wf_fac;
	bool        wfIS_Yangzhou_Model;
	bool		wf_manset_able;
	bool		wf_signboard_able;
	XUCHAR		wf_key_type;
	bool        wf_task_Only;
	bool        wf_Prompt_DownKey;
	bool        wf_Is_Limit_Jiange;
	bool        wf_Is_Forbidden_CommPrompt;
	bool        wf_Is_Ok_Dialog;
	bool        wf_Is_ShowDXIdentity;

	XUCHAR      wfIS_10kV_Type;
	XUCHAR		wfIS_YB_goose_Enable;
	XUCHAR		wfIS_ZXWF_LIMINT_Enable;

	int         wf_ZXWF_Last_operate_dotlocktime;
	int         wf_ZXWF_auto_moni_spintime;
	int         wf_ZXWF_Dot_lockDelay;

	//以下未写组态
	bool        wf_check_dev_commerror;//本间隔通讯中断，是否允许开票
	bool        wf_check_relative_dev_commerror;//本原件操作涉及规则项设备通讯中断，是否允许操作
	bool        wf_check_relative_dev_jx;//本原件操作涉及规则项设备置检修态，是否允许操作

	bool        wf_check_dev_guapai;//本间隔挂牌，是否允许开票
	bool        wf_check_relative_dev_guapai;//本原件操作涉及规则项设备挂牌，是否允许操作


	_STRUCT_SYSTEM_PARA_INFO()
	{
		memset(default_file,0x0,250);
		wf_Is_wf_fac=TRUE;
		wfIS_Yangzhou_Model=FALSE;
		wf_manset_able=FALSE;
		wf_signboard_able=FALSE;
		wf_key_type=WF_KEY_TYPE_Contrl_31;
		wf_task_Only=FALSE;
		wf_Prompt_DownKey=TRUE;
		wf_Is_Limit_Jiange=FALSE;
		wf_Is_Forbidden_CommPrompt=FALSE;
		wf_Is_Ok_Dialog=FALSE;
		wf_Is_ShowDXIdentity=FALSE;
		wfIS_10kV_Type=0;
		wfIS_YB_goose_Enable=0;
		wfIS_ZXWF_LIMINT_Enable=0;

		wf_ZXWF_Last_operate_dotlocktime=0;
		wf_ZXWF_auto_moni_spintime=0;
		wf_ZXWF_Dot_lockDelay=0;
	}
}STRUCT_SYSTEM_PARA_INFO;

typedef struct _WF_PARAM_YC_INDEX										//五防遥测
{
	XCHAR IndexName[BYNAME_LEN*sizeof(XCHAR )];		//简称
	_WF_PARAM_YC_INDEX()
	{
		memset(IndexName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
	}

}WF_PARAM_YC_INDEX; 
typedef struct _WF_PARAM_YX_SIMPLE										//五防遥信基本信息
{
	XINT			ID;
	XCHAR 			IndexName[BYNAME_LEN*sizeof(XCHAR )];		//简称
	XCHAR 			FullName[STRING_NORMAL_LEN*sizeof(XCHAR )];			//全名
	XINT            WFType;                                               //五防类型
	_WF_PARAM_YX_SIMPLE()
	{
		ID=0;
		memset(IndexName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
		memset(FullName, 0x0, STRING_NORMAL_LEN*sizeof(XCHAR ));
		WFType=0;
	}

}WF_PARAM_YX_SIMPLE;

typedef struct _WF_PARAM_YX_INDEX										//五防遥信
{
	XCHAR 			IndexName[BYNAME_LEN*sizeof(XCHAR )];		//简称
	_WF_PARAM_YX_INDEX()
	{
		memset(IndexName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
	}
}WF_PARAM_YX_INDEX;

typedef struct _WF_PARAM_YX_SIMPLE_RELATIVE								//五防遥信
{
	XCHAR 			DevByName[BYNAME_LEN];				//相关遥信父设备别名
	XUSHORT 		RelativeYXIndex;									//相关遥信点号
	_WF_PARAM_YX_SIMPLE_RELATIVE()
	{
		memset(DevByName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
		RelativeYXIndex=0;
	}
}WF_PARAM_YX_SIMPLE_RELATIVE;

typedef struct _WF_PARAM_SPECIAL_OPRE_SIMPLE							//设备专用操作短语
{
	XBYTE			StartState;											//起始状态字
	XBYTE			EndState;											//结束状态字
	_WF_PARAM_SPECIAL_OPRE_SIMPLE()
	{
		StartState=0;
		EndState=0;
	}
}WF_PARAM_SPECIAL_OPRE_SIMPLE;

typedef struct _WF_PARAM_COMM_OPRE_SIMPLE								//设备通用操作短语
{
	XBYTE			StartState;											//起始状态字
	XBYTE			EndState;											//结束状态字
	_WF_PARAM_COMM_OPRE_SIMPLE()
	{
		StartState=0;
		EndState=0;
	}
}WF_PARAM_COMM_OPRE_SIMPLE;

#define RD_LT_YC			   0
#define RD_GT_YC			   1
typedef struct _WF_RULE_SIMPLE										//五防文本规则
{
	XCHAR 		  IndexName[BYNAME_LEN*sizeof(XCHAR )];	//简称
	XBYTE         RuleType;//9:yx 10:yc
	XBYTE         H_L_YC;//0:< 1:>
	XFLOAT        state;
	XBYTE         Group;
	XBYTE         Step;
	XBYTE         CloseType;
	_WF_RULE_SIMPLE()
	{
		memset(IndexName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
		Group=0;
		RuleType=0;
		H_L_YC=0;
		state=0;
		Group=0;
		Step=0;
		CloseType=0;
	}
}WF_RULE_SIMPLE;

typedef struct _WF_PARAM_LOCK_ADD      						//锁码文件和别名对应表
{
	XCHAR 	IndexName[BYNAME_LEN*sizeof(XCHAR )];	//简称
	XINT 	LockAdd;									    //锁码
	_WF_PARAM_LOCK_ADD()
	{
		memset(IndexName, 0x0, BYNAME_LEN*sizeof(XCHAR ));
		LockAdd=0;
	}
}WF_PARAM_LOCK_ADD;

typedef struct STRUCT_PATH_TICKET_
{
	XINT 				ID;									   //ID
	XCHAR 				TicketName[BYNAME_LEN];		           //名称
	XBYTE             TicketNum;                               //操作票号
	XBYTE             DB_Type;
	STRUCT_PATH_TICKET_()
	{
		ID=0;
		memset(TicketName,0x0,BYNAME_LEN);
		TicketNum=0;
		DB_Type=2;
	}
}STRUCT_PATH_TICKET;

//兼容数据关联联结构模块
typedef struct STRUCT_COLUMN_SIMPLE_INFO_
{
	XINT		table_id;
	XCHAR	    column_Chinese_name[COLUMN_CHN_NAME_LEN];
	XINT		column_id;
	STRUCT_COLUMN_SIMPLE_INFO_()
	{
		table_id=0;
		memset(column_Chinese_name,0x0,COLUMN_CHN_NAME_LEN);
		column_id=0;
	}
	~STRUCT_COLUMN_SIMPLE_INFO_()
	{
	}
}STRUCT_COLUMN_SIMPLE_INFO;
//关联五遥定义表
typedef struct _rYxDefine_Connect
{
	XINT          ID;
	XUSHORT       IndexNo;									//点号
	XCHAR         Name[STRING_NORMAL_LEN];					//名称
	_rYxDefine_Connect()
	{
		ID=0;
		IndexNo=0;
		memset(Name, 0,STRING_NORMAL_LEN);
	}
	~_rYxDefine_Connect()
	{
	}

}rYxDefine_Connect,rYcDefine_Connect,rYkDefine_Connect,rYtDefine_Connect,rYmDefine_Connect;
#pragma pack()
#endif // DEFINE_TICKET_H